package com.jhs.kjs.dto;

public class CustomerPagingDTO extends CustomerDTO {
	private final static int unit = 10;

	private int start = 0;
	private int end = 0;
	private int nowSeq = 0;
	private int page = 1;
	private int totalPage = 0;
	private int seq = 0;
	private int searchType;
	private String searchName;
	private String orderBy;
	private String closeCustomerYn;
	private int regiCarCnt;
	private String serviceName;
	private String agentName;
	public int getStart() {
		if (getPage() > 0 && start == 0) {
			return 1 + unit * (getPage() - 1);
		}
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getEnd() {
		if (getPage() > 0 && end == 0) {
			return unit * getPage();
		}
		return end;
	}

	public void setEnd(int end) {
		this.end = end;
	}

	public int getNowSeq() {
		return nowSeq;
	}

	public void setNowSeq(int nowSeq) {
		this.nowSeq = nowSeq;
		int i = 0;

		for (; unit * i < nowSeq; i++) {
			page = i + 1;
		}
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getSeq() {
		return seq;
	}

	public void setSeq(int seq) {
		this.seq = seq;
	}

	public int getSearchType() {
		return searchType;
	}

	public void setSearchType(int searchType) {
		this.searchType = searchType;
	}

	public String getSearchName() {
		return searchName;
	}

	public void setSearchName(String searchName) {
		this.searchName = searchName;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}

	public String getCloseCustomerYn() {
		return closeCustomerYn;
	}

	public void setCloseCustomerYn(String closeCustomerYn) {
		this.closeCustomerYn = closeCustomerYn;
	}

	public int getRegiCarCnt() {
		return regiCarCnt;
	}

	public void setRegiCarCnt(int regiCarCnt) {
		this.regiCarCnt = regiCarCnt;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getAgentName() {
		return agentName;
	}

	public void setAgentName(String agentName) {
		this.agentName = agentName;
	}
	
	
}
